Move a function into proper place
Trying to extract just needed data