remove dependancy on *malloc()