updated mock dunction