code for testing rest