constructor should be replaced with external "factory" function