added more functions for the engine