changed the way we receive input
partly implemented extractor