hard coding margin to 1000