removed redundant and buggy parts