added border for invalids and new event listeners