added delayed jobs
beginning rewrite
rewrite part 2