non allocation works perfectly, allocation has some bugs