got rid of useless variables