refactored uneeded old code