Working but needing to be debugged