tested and debugged code