simplified version compiles