Added ball loader algorithm