code refactor

cannot work with it as it was previously