more progress, still not happy with the api