trouble shooting the proportion frame function