Simplified to better code