add abstract class and started writing functionality