added distinct to getbintypes, converted tabs to spaces