some more inputs and cleanup