working implementation, need to account for non variable styles