added superficial operators, refactored memory allocation