tested the functions, fixed messages.