add a general fixation function and a test