implemented new version

now works only with int and types inherited from Base Class