change type of onCommand to void