implemented session functions