refactored parsing and duration methods