implemented my own malloc function