added plan management to the api