made script shorter and easier