modified engine to comply with tests
fixed explicit relative import
added test for engine