fixed bug in bookfunctions. recalculates locations