fixed bugs
fixed indents
updated todo
refactored