First version of filtering / preparing data