TODO modified after Abraham's suggestions