updated with yulle's work