moved help into a function