cleaned up unwanted code

moved to util package since reusable