added fetch coordinates code