added empty element removal