refactored static createproxy() method out into a separate factory class