Edited implementation