move functions below protypes