added method annotation for tab and cast to int for safety