removed unused var txtshift, added comment