aligned code, removed unnecessary variable