add method to read integer