modified last exercise based on directory organization