sanyam's code copy