adding validation and stuff