better solution to silence warning "may be used uninitialised"