I think this would be worth extracting in an own method. E.g. `parse_input_value` or something like that and then do 

self. top = parse_input_value(top)