more logical code placement