improve code structure

s