finished dynamic calculation for width ahd height ratio