move entities to own library class
use scheduler