better way to compile