added int g
added double t