Rebuilt for my purposes