start of conversion to swift..