validartion, bug fixes