fixed bug where values wold overwrite