got rid of unnecessary allocation