trying to reduce unused vars and rename things