added rest with tests