functions for ultima, penult and antepenult