changing place of a function around

new home for partition function