works roughly need to refactor and rethink sessions