legacy code refact v0.9