made that now cron schedule is working
some code clean up