Final version, tested. -v2