modified implementation added