Fixed build path issue and implemented Fadi's code