wrote pseudo code
ok