Update: not done yet but commented code works