perhaps you should write in pseudo-code what you want