added check if initialized