added check to conversion