changed order of code + addd drag