added more parameter control