made download work correcvtly