added code, not sure if is the last fixes