Created the logic class