better memory handling is added