remove session dependency from API