session: removed duplicated function