removed some special cases; was able to trim code accordingly