added configuration to controller function