added check on g tot