time and memory allocation