replaced repeated procedure with correct one