changed bool to int for ach reasons