first solution attempt for compiling