building initial features and checking validity