description and implementation of spaghetti