Small modifications for compiling and testing but doesn't work