added operator>>
simplified constructors