Implemented #9, needs validation testing