I think these code should be in a separated PR