developing function to expand the fraction