add a cron job and fixed methods