need to fix last input