Converting pseudo code