fixed writeBytes default arguments, cleaned up readBytes'