naive implementation improvements