got rid of redundant operations