added pseudo code sample