take out excess code