Seperate some function to a independent file