Working implementation

Everything should work