added option to switch between singleton and prototype scope