some changes to func align