refactored to use parser... -sai