started to make rest api work... wip