added two tests from Amazon programming test.