preprocess for amber