Final version (TODO: fix edit and user)