does it make sense to split this into a separate methods ? its pretty hard to guess the functionality