rearrange app to module pattern
size gate functionality done