added check for code only