mods to alignment function