sorted variables and added new commands