add rest test file and bug fix