added hak's changes