Added some logic and pseudocode

Version 0.02