assigns next slot if not specified