renamed functions and dropped n to 10 from 19