converted java to goroovy