fixed reading in, works perfectly. just need to handle overflow now