updated with rayan's latest