Controlled release of biologically active agents