second attempted solution for compile