fixed struct def and simplified construction of new value