updated mock logic