Fix previous code according to Robin and do some stuff