made is_stateless function