checkpoint
move logic into rake file