trying to figure out way of validation