cleared some redundant code from activity