splitting up main js by function type