Memory allocation works

coded after first fit