more pseudo code added