added starting point loop