data structure and modularizing