removed duplication in Unity code
removed duplication with the help of *args