partially optimized init method