added isEmpty() method to stack
contains related changes required in List