An elementary treatise on mechanics