fixed variable naming
use std type trait for static if