working REST adapter