moved data types to smaller scope