Rename class and add input condition validation