making the commands attribute an array and bugfixing