code improvements, more supports