changed names, cleaned code