* Refactored the ownership algorithm and improved the performance a litle