refactor brownpeterson