added instructions and enhanced memory management