calculating base locally