played with extention handling (needs fixing)