got rid of unnessasary variables