replaced magic number 3 with constant
merger: moved overlay to define