created initSession function for init step call