new working code for int double std