cleaned up engine api a bit