code for the smartscope