form now working properly