adjust return logic