updated after solutions