refactor sth. about reflection.