updated to use different methods for init