got rid of useless codes