removed a lot of duplicate stuff