fixed Method

fixed wrong calculation of the references