Fix scoping issue in initialize()
Add linear version