divided exsiting functions to sub modules