refactored object behavior
changed error message
added some parsing options