remade as an object instead of a function