epic fail fixed (length != messege type, omg)
refactoring
finishing up