Parameters a and b added
Started with plot function