added tests for parseElement
fix parseElement