update rakefile, add tests