Code updated, more functions added