improved starting code