complete the required function