replace conditional require