Working version for int, bool and string