added initial calculation stuff