merged with fixes