initial algo commit
add algo skeleton - UNTESTED
fix indents
rough algo