modified by piyumie