merged changes from Shmuma