move function below, jshint 083