Working version with updates