I'm still working on this code, will remove when the code is debugged and working.