ADDED integer check incoming variable