updated documentation + fixed faulty input