Incorporated Mikael's changes