changed size_t to int for compatibility between machines over ach