move allocation of parameters to init