changing upload method for more compatibility