removed double allocation