added sequence() function
updated with sequence() function