updated to use variables