added some ideas in pseudocode