reverted to faster version of gigawatt code