created update_resource method to allow subclass overwritting