improved documentation and added timeout behavior