still using flags instead of equation...