fix to base calculation