updated the GT and RPC condition, working code