Implemented inefficiently, switching to new branch