handled deprecation and unchecked compiler warnings