for CS401 semester's project