p3.rb finished, few test cases