altered code a slight bit
merge