replace magic numbers by constants