make sure images do not overlap