write big part of code