modularizing code