now compatible with shtml and html