minor edits. changed most int to byte