forem logic