refactored to return error object instead of dalse when interface fails