added code that was in Thet Su code