Filling in pseudo code