modified with test and dev implementation