add decorator for better parameter passing