completed handle_first function; stand by for testing