Can't understand credit calculations