Tamal's code