wrote the submitLine function