initialize function now passes connection as first argument and after that all other arguments passed by the constructor