performing calculation