Implemented it in so far

Problem still persists
Added various checks