added sample data api plus some unit tests