added master_id field
fixed beat division calculations