changed integer variable types to Int