moved calc like to seperate file
started work on update q, removed some unneeded callocs