All working, might need additional error checking