// adapted