started library functions; f finished Engine class;