fix rebase bug; adjust cost function
Merge branch 'master' of https://github.com/jdhenke/pad