Very rough version, maths not OK.