fixed memory issue, all specs pass