improved code separation