seperated js according to defferent purpose