moved and operator to more logical place