added random IDs and fixed callbacks