some functions written + struct session data