5.8 magnitude earthquake jolts parts of country