changed constructor pattern to avoid instantiation prototypes directly or using the new keyword