finished copyranks (long time ago, but somehow didnt commit?)