add rest method to backend