testing code and more fixes