This is the pseudo code i'll be playing with