just added comments and junk, this is basically done