added more variations and fixed warnings