Second implementation added and functional.