added support for start and end option