move to outside js file finally include logs