first version, can work nice under mavericks