same but without temp file