changed the way of initializing rest controllers