added upload feature and starting of validate function