removed redundant pieces of code