using only required services
resizing optimized and code refactored