updated api to allow for toggling the editability on or off