changed to heap memory