init method for all models