Edited Implementation