adding dynamic calculation for centering